require 'capybara/rspec'
require 'capybara/rails'
require 'capybara/poltergeist'

Capybara.javascript_driver = :poltergeist

Capybara.register_driver(:poltergeist) do |app|
  Capybara::Poltergeist::Driver.new app, js_errors: true, timeout: 30
end
